*main
#DEFINE txtFolder "TXT"

set date ymd 
set mark to '-'
set century on 
set safety off

CLEAR ALL
CLEAR 
CLOSE DATABASES ALL

*!*	#DEFINE MAXITEMS 10
*!*	CLEAR
*!*	FOR gnCount = 1 TO MAXITEMS
*!*	   ? gnCount
*!*	NEXT




lc_current_path=JUSTPATH(SYS(16,0))
lc_path=left(lc_current_path,rat("\",lc_current_path))
lc_procedure=lc_path+"class\common.prg"
lc_visual_class1 = lc_path+"class\commonvisual.vcx"
?"lc_path:"
??lc_path
?lc_procedure
lc_prog_path=lc_path+"program"
lc_prog_func = ADDBS(lc_path)+"main.prg"
*lc_object_path=lc_path+"object\drink_library"
*lc_object_path1 = lc_path + "object\drink.vcx"

Set Default To (lc_prog_path)
set procedure to (lc_procedure)	additive
SET PROCEDURE TO (lc_prog_func ) additive
*set procedure to (lc_object_path) additive

set classlib to (lc_visual_class1) additive
*set classlib to (lc_visual_class2) additive
*set classlib to (lc_object_path1) additive

*!*	local lsCurrentPath as string ,lsPath as String ,lsProgramPath as string
*!*	lsCurrentPath = JUSTPATH(SYS(16,0))
*!*	lsPath = left(lsCurrentPath,rat("\",lsCurrentPath))
*!*	?lspath

LOCAL ls_sql,v1,ln_hand,ls_cn
v1 = "AEF1"
ls_sql = "SELECT cu_no,cu_j,cu_name,cutype FROM CS_CUSTOMER WHERE 1=1 " + v1
*!*	ln_hand = SQLSTRINGCONNECT("Driver={SQL Native Client};Server=192.168.11.4\SQLEXPRESS;Database=test; Uid=sa;Pwd=1qaz2wsx;")
*!*	?SQLEXEC(ln_hand,"SELECT * FROM CS_CUSTOMER WHERE cu_no=?lc_no")

ls_cn = "Driver={SQL Native Client};Server=192.168.11.4\SQLEXPRESS;Database=test; Uid=sa;Pwd=1qaz2wsx;"

PUBLIC fff as db_CS_CUSTOMER
fff = CREATEOBJECT("db_CS_CUSTOMER",ls_cn)
SET STEP ON 
fff.get_data(v1,"")


on error do errorHandle with message(1)
